package com.ctsi.security;

import com.ctsi.commons.util.response.Page;
import com.ctsi.security.domain.Permission;
import com.ctsi.security.domain.PermissionType;

import java.util.List;


public interface PermissionTypeSer {
	public static final String ROOT = "0";

	/**
	 * 条件查询数据
	 * 
	 * @param field
	 * @param args
	 * @return
	 */
	public abstract List<PermissionType> findPermissionType(String[] field, Object[] args);
	/**
	 * 保存对象
	 * 
	 * @param
	 */
	public void savePermissionType(PermissionType permissionType);
	/**
	 * 删除对象
	 * 
	 * @param permissionType
	 */
	public abstract void removePermissionType(PermissionType permissionType);
	
	public abstract void updatePermissionType(PermissionType permissionType);

	public abstract void removePermissionType(String id);

	public abstract int[] removePermissionType(String[] arrayId, String[] arrayPermTypeId);

	public abstract Page queryPermissionType(int pageSize, int startIndex);

	public abstract Page<PermissionType> queryPermissionType(
            String userLoginId, String dataObjectType, String action,
            String permissionTypeId, String permissiontypeName, int pageSize,
            int startIndex);

	public abstract List<PermissionType> findPermissionTypeAll();
	
	public abstract PermissionType findByPermisionTypeId(String typeId);

	public abstract String findPermissionType();

	public abstract boolean valPermTypeId(String permTypeId);

	public abstract List<Permission> findAllChildPermision(String typeId, String loginId);

	public abstract List<PermissionType> findAllChildPermisionType(String typeId, String userLoginId);

	public abstract List<PermissionType> findAllSon(String parentId);

	public abstract List<PermissionType> findAllSon(String userLoginId, String dataObjectTye, String action, String parentId);

	public abstract String getDataObjectTye();

	public abstract ISecurity getSecurity();

}